class Hypnoshroom extends GuaAnimation {
    static new(game) {
        let p = new this(game, animationHypnoshroom)
        p.setup()
        return p
    }

    setup() {
        // row表示在草地的第几排
        this.row = -1
        this.cooldown = 5
        this.score = 75
        this._sleep = true
        this.hp = 10
    }
    awake(){
        this._sleep = false
    }
    sleep(){
        this._sleep = true
    }

    remove() {
        this.scene.removeHypnoshroom(this)
    }
    eat(){
        if (!this._sleep){
            this.hp--
            if (this.hp === 0){
                this.remove()
            }
        }
    }


    update() {
        super.update()
        this.eat()
    }
}